package com.cirkana.viewer.data;

import com.cirkana.data.IDataColumnDef;

public class DataColumnDef implements IDataColumnDef {

	private int columnPosition;
	private String columnName;
	private Class<?> columnType;
	private boolean key;
	private boolean autoKey;

	public DataColumnDef(int position, String columnName, Class<?> columnType, boolean key, boolean autoKey) {
		super();
		this.columnPosition = position;
		this.columnName = columnName;
		this.columnType = columnType;
		this.key = key;
		this.autoKey = autoKey;
	}

	public DataColumnDef(int position, String columnName, Class<?> columnType, boolean key) {
		this(position, columnName, columnType, key, false);
	}

	public DataColumnDef(int position, String columnName, Class<?> columnType) {
		this(position, columnName, columnType, false, false);
	}

	@Override
	public int getColumnPosition() {
		return this.columnPosition;
	}

	@Override
	public String getColumnName() {
		return columnName;
	}

	@Override
	public Class<?> getColumnType() {
		return columnType;
	}

	@Override
	public boolean isKey() {
		return this.key;
	}

	@Override
	public boolean isAutoKey() {
		return this.autoKey;
	}
}
